public class _1quick{
    public static void main(String[] args) {
        int a[]={1,2};
        int n =a.length;
        qsort(a,0,n-1);
        for(int i:a){
            System.out.print(i+" ");
        }
    }
    static void qsort(int a[],int l,int r){
        if(r<=l){return;}
        int x=a[(r+l)/2],i=l-1,j=r+1;
        while(i<j){
            do i++;while(a[i]<x);
            do j--;while(a[j]>x);
            if(i<j){swap(a,i,j);}
        }
        qsort(a, l, j);
        qsort(a, j+1, r);
    }
    static void swap(int a[],int i,int j){
        a[i]=a[i]^a[j];
        a[j]=a[i]^a[j];
        a[i]=a[i]^a[j];
    }
}